package org.niugang.client.hystrix;

import org.niugang.bean.JWT;
import org.niugang.client.AuthServiceClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 *   获取token降级函数
 * Copyright: Copyright (c) 2018 863263957@qq.com
 * 
 * @ClassName: AuthServiceHystrix.java
 * @version: v1.0.0
 * @author: niugang
 * @date: 2018年11月20日 下午2:17:56
 */
@Component
public class AuthServiceHystrix implements AuthServiceClient {

	private static Logger logger = LoggerFactory.getLogger(AuthServiceHystrix.class);

	@Override
	public JWT getToken(String scope, String clientId, String clientSecret, String type, String username,
			String password) {
		logger.error("Query token failed,execute fallback");
		return new JWT();
	}

}
